<template>
    <div class="box">
        <el-form :inline="true" :model="filterData" class="demo-form-inline">
            <el-form-item label="">
                <el-input v-model="filterData.name" placeholder="请输入名称"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="submit" icon="el-icon-search">查询</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="reset" icon='el-icon-refresh'>重置</el-button>
            </el-form-item>
        </el-form>
        <el-form>
            <el-button type="primary" @click="add" icon='el-icon-folder-add'>新增</el-button> 
        </el-form>
       
    </div>
</template>

<script>
    export default {
        name: 'ZdpzFilter',
        data() {
            return {
                filterData: {
                    name: '',
                }   
            }
        },
        methods: {
            submit () {
                this.$emit('filterData', this.filterData)
            },
            reset () {
                this.filterData.name = ''
                this.$emit('filterData', this.filterData)
            },
            add () {
                this.$emit('add')
            }
        }
    }
</script>

<style scoped>
.box{
    display: flex;
    justify-content: space-between;
}
</style>
